#include<stdio.h>
#include<stdlib.h>
#include<conio.h>
struct stu
{
  char name[10];
  int num;
  int age;
  char adress[15];

};
void main()
{
  FILE *fp;
  char ch;
  int i;
  struct stu boya[2],boyb[2],*pp;
  pp = boya;
  if((fp=fopen("stu_list.txt","w+")) == NULL)
  {
     printf("error open");
     getch();
     exit(1);
  }
  printf("\ninput data\n");
  for(i=0;i<2;i++,pp++)
  {
     scanf("%s%d%d%s",pp->name,pp->num,pp->age,pp->adress);  
  }
  pp=boya;
  for(i=0;i<2;i++,pp++)
  {
    fprintf(fp ,"%S %D %d %s\n",pp->name,pp->num,pp->age,pp->adress);
    fclose(fp);	
  }
}